Code Clean up + Some added features