Cleared up spark.php

Moved base classes to the libraries folder
Moved router to the libraries