Cleaned up code, removed all the little warnings.