Cleaned up interface for function code.