Refactor slightly to allow more fragment types

Makes it a little easier to change the types of fragments in the future if we need to. :)