removed source as out-of-spec, code cleanup with better datatypes