A bit more code and added some classes