Custom views support

Added custom views support using approach I've described here #3