mv arrange in its own file
correctly handle NA in arrange. closes #331