Improved parsing, need to implement redirect