cleaning up, minor bug fixes, typos etc