Fatal error with vector, rewrite vector definition, add algebra for inline function utility