organized index.php

seperated files into utils for use within slim