moved class definitions to inc/* and added more documentaiton