Added AJAX

Addede ajax throughout the project, cleaned up some admin functions and
made stuff better :)