Code cleanup and get rid of all exceptions.