- Code cleanup and other bugfixes