Added getMLA and getBoundary functions and cleaned up