Code Cleanup and Config Implementation