Validation Added

Other small bug fixes. Almost finished