Added typed roles support

Missing tests for same but verified by reading