More bug fixes and general improvements