Huge bugs removed, Code cleanup. There are still some bugs, they'll be removed later