Refactored into more specific guard methods and some miscelaneous fixes