Static resource support, fixed an issue where the same controller was reused and some cleanup