Re-factoring classes to be prototype based to verify improvements in speed and memory usage