Code Cleanup

Moved some assignments around, automated naming of resources