Added code to separate framework from implementation