Remove useless getType function
Use own scope for page variable