Complete overhaul; Rewritten with Slim Framework