slight improvements & got rid of warnings