cleaned up files and added dyn-var functions, but they still need work