Ported over to JCanvas + optimizations