Big changes, lots of debugging and changes