Miscellaneous Apex classes and triggers