Cleaned up code and linked the activities together.