Bugfixes, think im done. Need clean up and comments