Re-factored some modules