More style compliant, less tokens, memory leak fixed