Moved constants into new file, other small changes
Added backward following debugging message
Minor changes