Add FK constraint and minor project cleanup