restructure program and add core folder