support custom SSL certs. refactor js api. initial work on cloudos base-image.