Fully cleaned up the code, implemented TaskedFragment subclass