various bugs and styling improvements