Create Re-Usable Functions

I've split out the code for placing labels into re-usable functions.