Finish conversion to module pattern.