Move code to src directory, add  lookup functions