Move logic to lib folder

Thanks to class autoloading, we can just move the files one folder down to the lib folder and all is done.