Fixed validation function
Fixed some styling