Fixed warnings and removed redundant code