Core functions implemented.