Added validation, clearing after changing page and removed an inline style