Add support for lazy initializated types

Resolves #331.
Why create a private class here, if the generic type argument is on the method? Couldn't it just have been a private static helper method?