Started fixing some stuff

Still lots of code that need changing