Initial commit, created core functions