Code consistency and redundancy

Various code consistency and redundancy cleanups