Added refactoring for better implementation of fragment interaction