WIP - Bug 931359

Based on @bharaththiruveedula's work.