removed not necessary comments, trailing spaces, carriage returns
added an argument to force is home as the given value and fixed bug that copying from the home page will generate a new home page