Released version, now starting to optimize and neaten up