Changed vectors to use double instead of float