Cleared up ambiguous parentheses found by gcc.
Removed extra const qualifier that was not needed.
Removed unused typedefs.