Added error handling, general touchups + styling