implemented missing caps and did some cleanups