Edited the module

Added order by to the sql query. SQL query no longer in the module file,
it is now all in the class file