Updated 23/08/2014

updated code to read parent ID from settings rather than manual edit