Added more stuff and started exception handling.