likeRefactor: moved and made code more concise. No logic changes

@jjpro123

Might be easiest to look at the file and not the diff since it's kinda hard to read due to ~150 lines being deleted