Cleaned code, removed duplication & prepared release