Performance improvement, UI tweaks

Changed SubD to use classical prototypes instead of a closure to define its methods; improved inlining.