Added logging and some basic js stuff