Fixed some junk, combined Doughy and mine's code.
Almost alpha testing stage.