Processed into BSD Style

and removed false typecastings.