Cleaning up debug and old code