Fix compile errors and make objects final.