Updated main files and example code