Dev

New structure works so merging and converting the rest of the code to use coroutines