Cleaning up old code

Moving subroutines to a separate config file for easier maintenance