Fixed various warnings and cleaned up unused code.

Change-Id: Id534dd6022fbaeb12381a721df639309a9122ad5
Merge topic 'lookup_table_cleanup' into next

ed8d994e Fixed various warnings and cleaned up unused code.