Refactored web stack and other minor improvements