clean up code

Got rid of useless files.

Split up general.js into to diff files.