Improved some helper functions and styling.