More bug fixes, polishing