use less code and fix memory leak
use less code and fix memory leak

polettix/mojo,kraih/mojo,kberov/mojo,marcusramberg/mojo,Grinnz/mojo,kiwiroy/mojo,dotandimet/mojo,s1037989/mojo,s1037989/mojo,jamadam/mojo,CandyAngel/mojo,lindleyw/mojo