Cleaned up the type issues