Moved all processing functions into separate JavascriptObject.