Fixed javascript trail mode, and completed sketch pad