RF: Moved the class definitions back to the top of the file.