Made improvements and fixed some bugs. Almost ready!