Added local test, fixed stuff