Implemented several new functions.