Cleaned up MDA and added a proper logger