Major simplification by Grassik incorporated.