Added a lot of comments. Added two more methods for custom animations in adding a fragment to the base activity. Optimized some code.