Update Code for 5.6+

Various code cleanups and update for 5.6