Code cleaned/documented