Clean up pureftp module and fix ordering issues