add south migrations and code clean