Algorithm

Fixed error in MiddleLayer(); formatted the output to be a little more
clean. Added removeRedundancy() and parseResult()