added gitignore
formatted to 2 spaces
init variables at beginning
moved interval init to func and updated style