Updating licence to apache, moving classes into separate packages