reorganized param files and cleaned up code