HTML test environment and first version of javascript api

Should probably leave out this functionality for now, otherwise we will need implement it correctly (e.g. getting the correct version number).