Complete re-write of alphabot