Minor update. Bugfixes and some clean up.