Quite too many updates for one commit

Prepared some stuff for a probable AJAX updating follow up
Added some primary keys verification, controls are disabled when there's
none
Optimized the file uploading
Added server side validators