Added base for rectangle class

The behaviour for it should be changed as it's pretty screwy.