implemented show_error.

Minor cleanup of other functions
Modified constants

changed the switch handler function to only do anything when the switch state changes from HIGH to LOW
removed useless constants

modified the functionality of is_initialized to check the state of the serial thread
minor changes to user-facing error handling

removed debugging statements in UI