add error logging
clean up styling and imports