Sorts method order by visibility

This makes the code clearer and more organized.