Added new public gear API tests and fixed some stack issues.