Implemented remaining functions (excluding TODO items).