Code cleanup, add tests for RACK_CONSOLE_PREAMBLE

Signed-off-by: David Celis <me@davidcel.is>