Cleanup code slightly

Increase buffer size
Remove redundant code
- Remove input buffer
- Remove dead assignment
Change envelope function to reduce clicking