Cleaned up for basic functionality.