moved js to its own file. Fixed default resolution.