fixed a ton of formatting/style issues in the code
removed the getFinal code to prevent false detection