Syntax clean ups and error handling.