Moving configuration to config file.
Avoids changing code only to change config.
Refactoring functions
Merge pull request #1 from Chris911/master

Adding configuration file and refactoring functions