alpha version

Mostly final code, just some optimizing and fixing before beta