Fixed various bugs in initial alpha