Fixed warnings, added programming features