Clean up code, implement once-whole contexts