Add functions file and new REM calculator