Added more documentation to source code, found a small bug where I forgot to return true for a specific case