code maintenance

cleaned up code a bit and added license header to all classes