Clean up, name changes and added error reporting systems