Rebase PR #38 to fix conflicts and merge it to spoon project