Cleaned up errors and warnings