made classes final and added some docs