First commit; lots of code cleanup to do

Long overdue commit, still need to remove debugging scripts and assets
etc. Lots to sort out.