Add preliminary DB logic, improve parsing. Update SConstruct.