Reworked main loop in Java code. Added shading, but it's rather strange yet.