Added positions functionality. Still need to debug