Just looked at this project again which reminded me how much of a mess the code is. This is just a reminder to clean it up when I get the chance.