Refactoring some things - also removing bin and debug from source control.