Use prototype practice for better performance.
Reference: http://jsperf.com/class-practice