Abstracted more variables for dynamic administration, as well as cleaned up code in general