Adapter optimized, code cleanup