Finished implementing everything and fixed bugs