Added some parameter handling