changed rootkey loading to read the file directly
comments all over the file are now supported
reference and var name fixes