Coded functions; corrected compile time errors.