Heavy refactoring, added GUI front end, preliminary build scripts