Refactored and cleaned up. Open corner detection is a bit buggy. Open
space detection is very buggy.