started with documentation + minor changes to require js