Move preview js code to its own file
Add default group information