Final head behaviour push. Code cleaned up and permanent head behaviour agent implemented.