Refactored creation and layout of subject/predict/object elements in single function.