Moved rapture js API to dedicated js file