Improved many things and fixed bugs.