Restructure!

Decided to use Slim framework to create a simple API. (see api.php)
Client interface will be made using javascript ajax request from index.php