Added implementations of missing functions.