Removed Loading bugs, general code cleanups.