added const parsing framework + minor dixes, cleanups

Signed-off-by: dvorkinista <villain@noironetworks.com>