Made conditional loading code pretty and less redundant