added consts.rb to hold frequently used magic values
fix broken case statement