Base js and some basic ajax calls