Moved to fragment design

Took all logic out of activity and moved it into a fragment