Added some js validation. UI improvements.