Getting refactoring done and some work on Primary Key done