Trailing slash optional
Models and general code improvements