Moved postname parameter to end of parameter list. Moved basename logic to constructor.