cleaned more code and added main fragment page