added thinky dependency, minor code refactoring
added api methods to insert goals
bug fix: update goal
load goals from database