Using creativity with design patterns in Javascript