Merge pull request #49 from daivanov/master

Abstract class instantiation with static factory methods