Cleanup and Update

Updated some part of the validation, removed some unused code. Still got
left to cleanup and update.