Added radix to parseInt calls, refactored messageHeader