Split methods for better modularity

Change-Id: I99f4f60754941489be9094b628f58bcad0419971