Add config file, tests and a tiny bit abstraction/code-reuse

Adding the following things:

* Config file - makes customizing easier than hunting down constants and changing those.
* Test cases - I don't trust code without tests, not even my own. Also as the code base grows having some test cases will be helpful.
* Integration with travis.ci -> see above.
* Remove some duplicated code.
* Reuse the bootstrap.php in the header include this will make the code base easier to maintain. Having duplicates is :cry: