Code cleanup

+fixes